﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="financeSelfHelp.aspx.cs"
    Inherits="PeisongWeb.admin.financeSelfHelp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register TagName="top" Src="controls/top.ascx" TagPrefix="uc1" %>
<%@ Register TagName="menu" Src="controls/menu.ascx" TagPrefix="uc2" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>应收款账单自助导出 - 想购网长期采购物流配送系统</title>
    <!--#include file="style.inc"-->
    <script type="text/javascript">
        function sClientValidation() {
            var c = document.getElementById('cboCompany');
            var t1 = document.getElementById('txtStartDt');
            var t2 = document.getElementById('txtEndDt');
            if (c.value.length == 0) {
                alert("请选择企业名称!");
                return false;
            }
            if (t1.value.length == 0) {
                alert('请选择开始日期!');
                t1.focus();
                return false;
            }
            if (t2.value.length == 0) {
                alert('请选择结束日期!');
                t2.focus();
                return false;
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <ext:ScriptManager ID="ScriptManager1" runat="server" />
    <uc1:top ID="Top1" runat="server" />
    <uc2:menu ID="Menu1" runat="server" />
    <div id="admin-body">
        <h2 class="section-cms">
            应收款账单自助导出
        </h2>
        <p>
            &nbsp;</p>
        <ext:Store runat="server" ID="storeCompany" AutoLoad="true">
            <Reader>
                <ext:JsonReader>
                    <Fields>
                        <ext:RecordField Name="companyId"></ext:RecordField>
                        <ext:RecordField Name="company"></ext:RecordField>
                    </Fields>
                </ext:JsonReader>
            </Reader>
        </ext:Store>
        <ext:Panel ID="Panel1" runat="server" Title="搜索" BodyStyle="padding:5px 5px 0"
            Width="960" Frame="true" ButtonAlign="Center">
            <Body>
                <ext:TableLayout runat="server">
                    <ext:Cell>
                        <ext:Label runat="server" Text="企业&nbsp;&nbsp;"></ext:Label>
                    </ext:Cell>
                    <ext:Cell>
                        <ext:ComboBox runat="server" ID="cboCompany" Width="300px" AllowBlank="false" Editable="false" Mode="Local"
                            TypeAhead="true" ForceSelection="true" TriggerAction="All" SelectOnFocus="true" StoreID="storeCompany"
                            BlankText="请选择企业名称!">
                        </ext:ComboBox>
                    </ext:Cell>
                    <ext:Cell>
                        <ext:Label runat="server" Text="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;收货日期&nbsp;&nbsp;"></ext:Label>
                    </ext:Cell>
                    <ext:Cell>
                        <ext:DateField runat="server" ID="txtStartDt" Vtype="daterange">
                            <Listeners>
                                <Render Handler="this.endDateField ='#{txtEndDt}'" />
                            </Listeners>
                        </ext:DateField>
                    </ext:Cell>
                    <ext:Cell>
                        <ext:Label runat="server" Text="&nbsp;&nbsp;至&nbsp;&nbsp;"></ext:Label>
                    </ext:Cell>
                    <ext:Cell>
                        <ext:DateField runat="server" ID="txtEndDt" Vtype="daterange">
                            <Listeners>
                                <Render Handler="this.startDateField ='#{txtStartDt}'" />
                            </Listeners>
                        </ext:DateField>
                    </ext:Cell>
                    <ext:Cell>
                        <ext:Label runat="server" Text="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"></ext:Label>
                    </ext:Cell>
                    <ext:Cell>
                        <ext:Label runat="server" Text="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"></ext:Label>
                    </ext:Cell>
                    <ext:Cell>
                        <ext:Button runat="server" ID="btnExport" Text="导出Excel" Icon="PageWhiteExcel" OnClientClick="return sClientValidation();" AutoPostBack="true" OnClick="btnExport_Click">
                        </ext:Button>
                    </ext:Cell>
                </ext:TableLayout>
            </Body>
        </ext:Panel>
    </div>
    </form>
</body>
</html>
